{include file="header"}
<div style="padding: 20px;">
<form class="layui-form layui-form-pane" action="">
<input type="hidden" name="userid" value="{$id}">	
<div class="layui-tab layui-tab-brief" lay-filter="docDemoTabBrief">
  <div class="layui-tab-content">
  	
  <div class="layui-form-item">
    <label class="layui-form-label">用户名</label>
    <div class="layui-input-block">
      <input type="text" name="username" value="{$c['username']}" required  lay-verify="required" placeholder="请输入名称" autocomplete="off" class="layui-input">
    </div>
  </div>
  <div class="layui-form-item">
    <label class="layui-form-label">状态</label>
    <div class="layui-input-block">
      <input type="radio" name="open" value="1" title="显示" {if condition="$c['open'] eq 1"}checked{/if}>
      <input type="radio" name="open" value="0" title="关闭" {if condition="$c['open'] eq 0"}checked{/if}>
    </div>
  </div>

    <div class="layui-col-md3"> 
  <div class="layui-form-item">
    <label class="layui-form-label">积分</label>
    <div class="layui-input-block">
      <input type="number" name="point" value="{$c['point']}" required  lay-verify="required" placeholder="请输入别名" autocomplete="off" class="layui-input">
    </div>
  </div>
  </div>
  <div class="layui-col-md3">    
  <div class="layui-form-item">
    <label class="layui-form-label">经验</label>
    <div class="layui-input-block">
      <input type="number" name="jingyan" value="{$c['jingyan']}" autocomplete="off" class="layui-input">
    </div>
  </div>
 </div>
   <div class="layui-col-md3">    
  <div class="layui-form-item">
    <label class="layui-form-label">邮箱</label>
    <div class="layui-input-block">
      <input type="text" name="usermail" value="{$c['usermail']}" autocomplete="off" class="layui-input">
    </div>
  </div>
 </div>
    <div class="layui-col-md3">    
  <div class="layui-form-item">
    <label class="layui-form-label">QQ</label>
    <div class="layui-input-block">
      <input type="text" name="userqq" value="{$c['userqq']}" autocomplete="off" class="layui-input">
    </div>
  </div>
 </div>
     <div class="layui-col-md3">  
  <div class="layui-form-item">
    <label class="layui-form-label">网址</label>
    <div class="layui-input-block">
      <input type="text" value="{$c['url']}" name="url"  placeholder="请输入名称" autocomplete="off" class="layui-input">
    </div>
  </div>
   </div>
   <div class="layui-col-md3"> 
  <div class="layui-form-item">
    <label class="layui-form-label">密码</label>
    <div class="layui-input-block">
      <input type="text" value="" name="password"  placeholder="留空不修改" autocomplete="off" class="layui-input">
    </div>
  </div>
 </div>
     <div class="layui-col-md3">  
  <div class="layui-form-item">
    <label class="layui-form-label">手机号码</label>
    <div class="layui-input-block">
      <input type="text" value="{$c['phone']}" name="phone"  placeholder="请输入名称" autocomplete="off" class="layui-input">
    </div>
  </div>
   </div>
  <div class="layui-form-item layui-form-text">
    <label class="layui-form-label">描述</label>
    <div class="layui-input-block">
      <textarea name="description"  placeholder="个人介绍" class="layui-textarea">{$c['description']}</textarea>
    </div>
  </div> 

  <div class="layui-form-item">
    <div class="layui-input-block">
      <button class="layui-btn" lay-submit lay-filter="html">立即提交</button>
    </div>
  </div>
	
</form>
      
<div>
{include file="footer"}
<script >
layui.use(['layedit', 'form', 'upload'],
function() {
    var form = layui.form,
    upload = layui.upload,
    jq = layui.jquery,
    layedit = layui.layedit;
    form.on('submit(html)',
    function(data) {
        loading = layer.load(2, {
            shade: [0.2, '#000']
        });
        var param = data.field;
        jq.post("{:url("member/update")}", param,
        function(data) {
            if (data.code == 1) {
                layer.close(loading);
                layer.msg(data.msg, {
                    icon: 1,
                    time: 1000
                },
                function() {
                    location.reload();
                });
            } else {
                layer.close(loading);
                layer.msg(data.msg, {
                    icon: 2,
                    anim: 6,
                    time: 1000
                });
            }
        });
        return false;
    });
})
</script >
